package com.voyer.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * Created by wzy on 2018/4/9.
 */
@RestController
public class ConsumerController {
    @Autowired
    RestTemplate restTemplate;
    @RequestMapping("/hi")
    public String hello(){
        return restTemplate.getForObject("http://PROVIDER-TEST/hi", String.class);
    }
}
